unit class_Map;

interface
uses GLScene, GLVectorFileObjects, GLMaterial, GLFileObj, GLFileJPEG, jpeg;

type
  TMap = class
    private
      FModel:TGLFreeForm;
    public
      constructor Create(Scene:TGLScene; MatLib:TGLMaterialLibrary; FileName:string);
  end;

implementation

constructor TMap.Create(Scene: TGLScene; MatLib:TGLMaterialLibrary; FileName: string);
begin
  Self.FModel:=TGLFreeForm.CreateAsChild(Scene.Objects);
  Self.FModel.MaterialLibrary:=MatLib;
  Self.FModel.LoadFromFile(FileName);
  Self.FModel.Material.Texture.Image.LoadFromFile('testmaptex.jpg');
  Self.FModel.Material.Texture.Disabled:=False;
  self.FModel.Position.X:=512;
  self.FModel.Position.Y:=-5;
  self.FModel.Position.Z:=512;
end;

end.
